$Version = "1.0.5"

$dt = Get-Date -Format s

$commitId = & git rev-parse HEAD

$goVer = go version
$goVer = $goVer.replace("go version ", "")

go build -o json_format.exe -ldflags "-X 'json_format/g.Version=$Version' -X 'json_format/g.BuildTime=$dt' -X 'json_format/g.GitCommitId=$commitId' -X 'json_format/g.GoVersion=$goVer'" main.go